package com.markerhub.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Component
@Configuration
@ConfigurationProperties(prefix = "weixin" )
@Data
public class Weixin implements Serializable {

    @Value("${weixin.app-id}")
   public String appId;

    @Value("${weixin.app-secret}")
    public String appSecret;

    @Value("${weixin.redirect-uri}")
    public String redirectUri;


    @Override
    public String toString() {
        return "Weixin{" +
                "appId='" + appId + '\'' +
                ", appSecret='" + appSecret + '\'' +
                ", redirectUri='" + redirectUri + '\'' +
                '}';
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getRedirectUri() {
        return redirectUri;
    }

    public void setRedirectUri(String redirectUri) {
        this.redirectUri = redirectUri;
    }
}
